<template>
    <div>
<van-search
  v-model="valuess"
  shape="round"
  background="#4fc08d"
  placeholder="请输入搜索关键词"
  @search="onSearch"
/>
<div class="bom" v-show="!cuse">
    <van-cell-group >
  <van-cell title="单元格" value="内容" label="描述信息" />
  <van-cell title="单元格" value="内容" label="描述信息" />
  <van-cell title="单元格" value="内容" label="描述信息" />
  <van-cell title="单元格" value="内容" label="描述信息" />
  <van-cell title="单元格" value="内容" label="描述信息" />
  <van-cell title="单元格" value="内容" label="描述信息" />
  <van-cell title="单元格" value="内容" label="描述信息" />
</van-cell-group>
</div>
<div class="box" v-show="cuse">
    <div class="rm">
        <h2>热门搜索</h2>
        <van-row :gutter="[20, 20]">
  <van-col span="12">span: 12</van-col>
  <van-col span="12">span: 12</van-col>
  <van-col span="12">span: 12</van-col>
  <van-col span="12">span: 12</van-col>
</van-row>
    </div>
    <div class="rm">
        <h2>历史记录</h2>
        <van-row :gutter="[20, 20]">
  <van-col span="12">span: 12</van-col>
  <van-col span="12">span: 12</van-col>
  <van-col span="12">span: 12</van-col>
  <van-col span="12">span: 12</van-col>
</van-row>
    </div>
</div>
<van-empty description="描述文字" />
    </div>
</template>

<script setup>
import { ref,watch } from "vue";
import router from "@/router";
import { qsearchApi } from "@/api/api";
let qsearchApiData=ref([])
let cuse=ref(true)
let valuess=ref('')
watch(valuess,(val)=>{
    if(valuess.value.length==0){
        cuse.value=true
    }else{
        cuse.value=false
        qsearchApi().then(res=>{
            qsearchApiData.value=res.data.message
            console.log('ss',res.data.message)
        })
    }
})
</script>

<style scoped>

</style>